﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace PaceR.Data.Transactions
{
    public abstract class BaseTransactionItem
    {
        public abstract void Execute();
    }

    public abstract class BaseTransactionItem<T> : BaseTransactionItem
    {
        public virtual T Entity { get; set; }
        public virtual Action<T> Action { get; set; }

        public BaseTransactionItem(T entity, Action<T> action)
        {
            Entity = entity;
            Action = action;
        }

        public override void Execute()
        {
            Action(Entity);
        }
    }
}
